"use strict";

angular.module('app.videoMonitor', ['ui.router','restangular'])
.config(function ($stateProvider,RestangularProvider,ACCESS_LEVELS) {

    $stateProvider

      
       .state('app.gateway', {
            url: '/gateway',
            views: {
                "content@app": {
                    templateUrl: 'app/video-monitor/views/gateway.html',
                        controller: 'GatewayCtrl'         
                
                }
            },
            data:{
                title: '网关管理',
                access_level:ACCESS_LEVELS.branch
            }
          })
       .state('app.plan1', {
            url: '/plan1',
            views: {
                "content@app": {
                    templateUrl: 'app/video-monitor/views/plan1.html',
                        controller: 'Plan1Ctrl'         
                
                }
            },
            data:{
                title: '显示策略1',
                access_level:ACCESS_LEVELS.branch
            }
          })
       .state('app.plan2', {
            url: '/plan2',
            views: {
                "content@app": {
                    templateUrl: 'app/video-monitor/views/plan2.html',
                        controller: 'Plan2Ctrl'         
                
                }
            },
            data:{
                title: '显示策略2',
                access_level:ACCESS_LEVELS.branch
            }
          })
       .state('app.plan3', {
            url: '/plan3',
            views: {
                "content@app": {
                    templateUrl: 'app/video-monitor/views/plan3.html',
                        controller: 'Plan3Ctrl'         
                
                }
            },
            data:{
                title: '显示策略3',
                access_level:ACCESS_LEVELS.branch
            }
          })
       .state('app.plan4', {
            url: '/plan4',
            views: {
                "content@app": {
                    templateUrl: 'app/video-monitor/views/plan4.html',
                        controller: 'Plan4Ctrl'         
                
                }
            },
            data:{
                title: '显示策略1',
                access_level:ACCESS_LEVELS.branch
            }
          })
        .state('app.camera', {
            url: '/camera',
            views: {
                "content@app": {
                    templateUrl: 'app/video-monitor/views/camera.html',
                        controller: 'CameraCtrl'         
                
                }
            },
            data:{
                title: '摄像头管理',
                access_level:ACCESS_LEVELS.branch
            }
          })
         .state('app.allcamera', {
            url: '/allcamera',
            views: {
                "content@app": {
                    templateUrl: 'app/video-monitor/views/allcamera.html',
                        controller: 'AllCameraCtrl'         
                
                }
            },
             onExit: function(){
                     
                     /*$scope.autoUpdate = false;*/
                      
                     },
            
            data:{
                title: '所有视频',
                access_level:ACCESS_LEVELS.branch
            }
          })

});


